package com.higgins.lawapp.client.maintenance.handlers;

//import com.google.appengine.api.taskqueue.Queue;
//import com.google.appengine.api.taskqueue.QueueFactory;
//import static com.google.appengine.api.taskqueue.TaskOptions.Builder;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.higgins.lawapp.client.maintenance.model.DataItemModel;
import com.higgins.lawapp.client.maintenance.presenter.DataItemPresenter;

public class RetrieveButtonHandler implements ClickHandler {
//	private final CompanyServiceAsync companyService = GWT.create(CompanyService.class);
	private DataItemPresenter dataItemPresenter;
	private DataItemModel dataItemModel;
	
	public RetrieveButtonHandler(DataItemPresenter dataItemPresenter)	{
			this.dataItemPresenter = dataItemPresenter;
			this.dataItemModel = dataItemPresenter.getDataItemModel();
		}
	
		public void onClick(ClickEvent event) {
			sendNameToServer();

		
			try	{
				
				
				
				
				
			} catch (Exception e)	{
				System.out.println("Retrieve Button Handler Exception: " + e.toString());
			}
		
		
		
		
		
		
		
		
		}

		public void callRetrieve()	{
			sendNameToServer();
		}
		
		private void sendNameToServer() {
			dataItemModel.retrieveRows();
		}
}
